\(\int \frac {x^2}{(a+b \log (c x^n))^2} \, dx\) [74]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 76 \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\frac {3 e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )}{b^2 n^2}-\frac {x^3}{b n \left (a+b \log \left (c x^n\right )\right )} \]

[Out]

3*x^3*Ei(3*(a+b*ln(c*x^n))/b/n)/b^2/exp(3*a/b/n)/n^2/((c*x^n)^(3/n))-x^3/b/n/(a+b*ln(c*x^n))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2343, 2347, 2209} \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\frac {3 x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )}{b^2 n^2}-\frac {x^3}{b n \left (a+b \log \left (c x^n\right )\right )} \]

[In]

Int[x^2/(a + b*Log[c*x^n])^2,x]

[Out]

(3*x^3*ExpIntegralEi[(3*(a + b*Log[c*x^n]))/(b*n)])/(b^2*E^((3*a)/(b*n))*n^2*(c*x^n)^(3/n)) - x^3/(b*n*(a + b*
Log[c*x^n]))

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log
[c*x^n])^(p + 1)/(b*d*n*(p + 1))), x] - Dist[(m + 1)/(b*n*(p + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p + 1), x]
, x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1] && LtQ[p, -1]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {x^3}{b n \left (a+b \log \left (c x^n\right )\right )}+\frac {3 \int \frac {x^2}{a+b \log \left (c x^n\right )} \, dx}{b n} \\ & = -\frac {x^3}{b n \left (a+b \log \left (c x^n\right )\right )}+\frac {\left (3 x^3 \left (c x^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{a+b x} \, dx,x,\log \left (c x^n\right )\right )}{b n^2} \\ & = \frac {3 e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )}{b^2 n^2}-\frac {x^3}{b n \left (a+b \log \left (c x^n\right )\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.92 \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\frac {x^3 \left (3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {b n}{a+b \log \left (c x^n\right )}\right )}{b^2 n^2} \]

[In]

Integrate[x^2/(a + b*Log[c*x^n])^2,x]

[Out]

(x^3*((3*ExpIntegralEi[(3*(a + b*Log[c*x^n]))/(b*n)])/(E^((3*a)/(b*n))*(c*x^n)^(3/n)) - (b*n)/(a + b*Log[c*x^n
])))/(b^2*n^2)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.35 (sec) , antiderivative size = 354, normalized size of antiderivative = 4.66

method result size
risch \(-\frac {2 x^{3}}{\left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 \ln \left (x^{n}\right ) b +2 a \right ) b n}-\frac {3 x^{3} c^{-\frac {3}{n}} \left (x^{n}\right )^{-\frac {3}{n}} {\mathrm e}^{-\frac {3 \left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 a \right )}{2 b n}} \operatorname {Ei}_{1}\left (-3 \ln \left (x \right )-\frac {3 \left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 b \left (\ln \left (x^{n}\right )-n \ln \left (x \right )\right )+2 a \right )}{2 b n}\right )}{b^{2} n^{2}}\) \(354\)

[In]

int(x^2/(a+b*ln(c*x^n))^2,x,method=_RETURNVERBOSE)

[Out]

-2*x^3/(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I
*c*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+2*ln(x^n)*b+2*a)/b/n-3/b^2/n^2*x^3*c^(-3/n)*(x^n)^(-3/n)*exp(-3/2*(
-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^
2-I*b*Pi*csgn(I*c*x^n)^3+2*a)/b/n)*Ei(1,-3*ln(x)-3/2*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(
I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+2*b*(ln(x^n)-n*ln(x))
+2*a)/b/n)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.33 \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=-\frac {{\left (b n x^{3} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} - 3 \, {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )} \operatorname {log\_integral}\left (x^{3} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right )\right )} e^{\left (-\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}}{b^{3} n^{3} \log \left (x\right ) + b^{3} n^{2} \log \left (c\right ) + a b^{2} n^{2}} \]

[In]

integrate(x^2/(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

-(b*n*x^3*e^(3*(b*log(c) + a)/(b*n)) - 3*(b*n*log(x) + b*log(c) + a)*log_integral(x^3*e^(3*(b*log(c) + a)/(b*n
))))*e^(-3*(b*log(c) + a)/(b*n))/(b^3*n^3*log(x) + b^3*n^2*log(c) + a*b^2*n^2)

Sympy [F]

\[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\int \frac {x^{2}}{\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}\, dx \]

[In]

integrate(x**2/(a+b*ln(c*x**n))**2,x)

[Out]

Integral(x**2/(a + b*log(c*x**n))**2, x)

Maxima [F]

\[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\int { \frac {x^{2}}{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}} \,d x } \]

[In]

integrate(x^2/(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

-x^3/(b^2*n*log(c) + b^2*n*log(x^n) + a*b*n) + 3*integrate(x^2/(b^2*n*log(c) + b^2*n*log(x^n) + a*b*n), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (77) = 154\).

Time = 0.37 (sec) , antiderivative size = 261, normalized size of antiderivative = 3.43 \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=-\frac {b n x^{3}}{b^{3} n^{3} \log \left (x\right ) + b^{3} n^{2} \log \left (c\right ) + a b^{2} n^{2}} + \frac {3 \, b n {\rm Ei}\left (\frac {3 \, \log \left (c\right )}{n} + \frac {3 \, a}{b n} + 3 \, \log \left (x\right )\right ) e^{\left (-\frac {3 \, a}{b n}\right )} \log \left (x\right )}{{\left (b^{3} n^{3} \log \left (x\right ) + b^{3} n^{2} \log \left (c\right ) + a b^{2} n^{2}\right )} c^{\frac {3}{n}}} + \frac {3 \, b {\rm Ei}\left (\frac {3 \, \log \left (c\right )}{n} + \frac {3 \, a}{b n} + 3 \, \log \left (x\right )\right ) e^{\left (-\frac {3 \, a}{b n}\right )} \log \left (c\right )}{{\left (b^{3} n^{3} \log \left (x\right ) + b^{3} n^{2} \log \left (c\right ) + a b^{2} n^{2}\right )} c^{\frac {3}{n}}} + \frac {3 \, a {\rm Ei}\left (\frac {3 \, \log \left (c\right )}{n} + \frac {3 \, a}{b n} + 3 \, \log \left (x\right )\right ) e^{\left (-\frac {3 \, a}{b n}\right )}}{{\left (b^{3} n^{3} \log \left (x\right ) + b^{3} n^{2} \log \left (c\right ) + a b^{2} n^{2}\right )} c^{\frac {3}{n}}} \]

[In]

integrate(x^2/(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

-b*n*x^3/(b^3*n^3*log(x) + b^3*n^2*log(c) + a*b^2*n^2) + 3*b*n*Ei(3*log(c)/n + 3*a/(b*n) + 3*log(x))*e^(-3*a/(
b*n))*log(x)/((b^3*n^3*log(x) + b^3*n^2*log(c) + a*b^2*n^2)*c^(3/n)) + 3*b*Ei(3*log(c)/n + 3*a/(b*n) + 3*log(x
))*e^(-3*a/(b*n))*log(c)/((b^3*n^3*log(x) + b^3*n^2*log(c) + a*b^2*n^2)*c^(3/n)) + 3*a*Ei(3*log(c)/n + 3*a/(b*
n) + 3*log(x))*e^(-3*a/(b*n))/((b^3*n^3*log(x) + b^3*n^2*log(c) + a*b^2*n^2)*c^(3/n))

Mupad [F(-1)]

Timed out. \[ \int \frac {x^2}{\left (a+b \log \left (c x^n\right )\right )^2} \, dx=\int \frac {x^2}{{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2} \,d x \]

[In]

int(x^2/(a + b*log(c*x^n))^2,x)

[Out]

int(x^2/(a + b*log(c*x^n))^2, x)